<template>
    <div class="detail">
        <div class="detail_title"><h1>{{ article[0].title }}</h1></div>
        <div class="detail_container">
            <span class="detail_time">{{ article[0].datetime }}</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            <span class="detail_view"><img src="../assets/eye88.png" style="width: 15px;margin-bottom: -2px;margin-right: 5px"/>{{ article[0].view }}</span>
        </div>
        <div class="detail_content">央视网消息（新闻联播）：23日中午以强台风级强度在广东珠海登陆的今年第13号台风“天鸽”，已成为今年以来登陆我国最强台风，目前已造成16人遇难，相关地区抢险救援工作一刻不停。24日下午，“天鸽”在广西境内减弱为热带低压。
            <br/>受“天鸽”影响，我国华南沿海地区出现狂风暴雨。气象监测显示，从22日中午12点到今天下午两点，广东、广西等地局地累计降雨量达到了250到400毫米。珠海、澳门、香港风力达到了16至17级，局地超过17级。</div>
    </div>
</template>

<script>
    export default {
      data () {
        return {
//        url: 'http://127.0.0.1/yoovan/laravel-vue-blog/public/api/article/',
          url: '/api/article/',
          article: []
        }
      },
      created () {
        let id = this.$route.params.id
        if (id) {
          let that = this
          that.$http({
            url: that.url + id,
            method: 'get'
          }).then(function (data) {
            console.log(data.data.data)
            that.article = data.data.data
          })
        }
      },
      methods: {
      }
    }
</script>

<style>
    .detail {
        width: 700px;
        margin: 0 auto;
    }
    .detail_title {
        font-family: "Montserrat", "Helvetica Neue", "Hiragino Sans GB", "LiHei Pro", Arial, sans-serif;
        text-align: center;
        color: slategray;
    }
    .detail_container {
        font-family: "Montserrat", "Helvetica Neue", "Hiragino Sans GB", "LiHei Pro", Arial, sans-serif;
        text-align: center;
        font-size: 15px;
        color: slategray;
    }
    .detail_content {
        font-family: "Montserrat", "Helvetica Neue", "Hiragino Sans GB", "LiHei Pro", Arial, sans-serif;
        margin-top: 30px;
        font-size: 18px;
    }
</style>